package com.chris.homecare.components
{
	import com.chris.homecare.utils.CommonUtils;
	
	import feathers.controls.LayoutGroup;
	import feathers.controls.TextArea;
	
	import flash.text.TextFormat;
	
	import starling.display.Quad;
	
	public class TextAreaComponent extends LayoutGroup
	{
		private var textAreaQuad:Quad;
		public var textArea:TextArea;
		
		public function TextAreaComponent()
		{
			super();
		}
		
		override protected function draw():void
		{
			textAreaQuad.width = this.explicitWidth;
			textAreaQuad.height = this.explicitHeight;
			
			textArea.width = this.explicitWidth - 2;
			textArea.height = this.explicitHeight - 2;
			
			super.draw();
		}
		
		override protected function initialize():void
		{
			textAreaQuad = new Quad(10,10,0xb3b2b2);
			this.addChild(textAreaQuad);
			
			textArea = new TextArea();
			textArea.x = 1;
			textArea.y = 1;
			textArea.textEditorProperties.textFormat = new TextFormat( "_sans", 32*CommonUtils.scaleValue, 0x000000);
			textArea.backgroundSkin = new Quad(10,10,0xf3f3f3);
			this.addChild(textArea);
			
			super.initialize();
		}
		
	}
}